<?php
/**
 *
 */


class DbIntegerField extends DbField {

    /**
     *
     */
    public function __construct($dbName,$null=false,$auto=false) {
        parent::__construct($dbName);
    }

    public function toPhp($value) {
        return intval($value);
    }

    public function toDb($value) {
        return $value;
    }
}

/**
 * standard primary key : unisgned integer not null auto increment
 */
class DbIntegerKeyField extends DbIntegerField {

    protected $key='primary';

    protected $auto=true;
}